package com.huiqiao.bus.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;


@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "bus_car")
public class Car {
    /**
     * ⻋牌
     */
    @Id
    private String carnumber;

    /**
     * ⻋辆类型
     */
    private String cartype;

    /**
     * 颜⾊
     */
    private String color;

    /**
     * ⻋辆价格
     */
    private Double price;

    /**
     * ⻋辆租⾦
     */
    private Double rentprice;

    /**
     * 押⾦
     */
    private Double deposit;

    /**
     * 是否租出(0未租出 1已
租出)
     */
    private Integer isrenting;

    /**
     * 描述
     */
    private String description;

    /**
     * ⻋辆图⽚
     */
    private String carimg;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createtime;

    /**
     * 获取⻋牌
     *
     * @return carnumber - ⻋牌
     */
    public String getCarnumber() {
        return carnumber;
    }

}